﻿#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace TheSpirit
{
    public abstract class Tower
    {
        #region Declaration

        protected Texture2D towerTexture;
        protected Texture2D attackTexture;
        protected int attack;
        protected float delay;
        protected float range;
        protected Rectangle worldLocation;
        protected Rectangle localLocation;
        protected Point tileLocation;
        protected Attribute towerAttribute;
        protected Enemy target;
        protected bool isAttack;
        protected Vector2 destination;
        protected Vector2 position;
        protected Vector2 velocity;
        protected Vector2 attackPoint;
        protected float attackVelocity;
        protected float distance;
        protected double attackTime;
        protected Animation towerAnimation;
        protected Animation attackAnimation;

        #endregion


        #region Property

        public Attribute TowerAttribute
        {
            set { towerAttribute = value; }
            get { return towerAttribute; }
        }
        public Texture2D TowerTexture
        {
            get { return towerTexture; }
        }
        public int Attack
        {
            get { return attack; }
        }
        public float Delay
        {
            get { return delay; }
        }
        public float Range
        {
            get { return range; }
        }
        public Rectangle WorldLocation
        {
            set { worldLocation = value; }
            get { return worldLocation; }
        }
        public Rectangle LocalLocation
        {
            set { localLocation = value; }
            get { return localLocation; }
        }
        public Point TileLocation
        {
            set { tileLocation = value; }
            get { return tileLocation; }
        }

        #endregion


        #region Abstract Method

        public abstract void LoadContent(ContentManager content);
        public abstract void Update(GameTime gameTime, List<Enemy> enemy, int worldX, int worldY);
        public abstract void Draw(SpriteBatch spriteBatch);

        #endregion
    }
}
